<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<title>加封业务单-我的易安</title>
		<%@ include file="/user_comm.jsp"%>
		<link rel="stylesheet"
			href="<%=request.getContextPath()%>/css/publish_detail_ke.css" />
		<link href="<%=request.getContextPath()%>/css/prop.css"
			type="text/css" rel="stylesheet" />
		<!-- script start -->
		<script>
		var checkSeqFlag=true;
		function checkValid(txtSeq){
			var seqId=txtSeq.value;
			if(seqId==""){
				$d("seqIdError").innerHTML="请输入封条号码";
				return;
			}
			var params = {
					seqId:seqId
					};
			$.ajax({type: "POST",
			       url: "ajax_findValid.do",
			       data: params,
			       async: true,   
			       success: function(result){
					 var validate=result.validate;
					 if(validate != null){
					  	var status=validate.status;
					  	if(result.retcode == "0000"){
					  		seqIdError.innerHTML="";
					  		checkSeqFlag=true;
					  	}else{
					  		checkSeqFlag=false;
					  		seqIdError.innerHTML=result.retmsg;
					  	}
					 }else{
					 	checkSeqFlag=false;
					 	seqIdError.innerHTML="封条不存在";
					 }
				  }
				},"json");
		}
		
		function previewImage(vSpanId,fileId){
		  	var imgName=vSpanId;
		  	var imgId=$d(fileId).value;
		  	$(imgName).html('');   
			    var newPreview =$(imgName)[0];     
				var imgDiv = document.createElement("div");
				document.body.appendChild(imgDiv);
				imgDiv.style.width = "100%";
		        imgDiv.style.height = "100%";   
		        imgDiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod = scale)";      
		        imgDiv.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgId;
				newPreview.appendChild(imgDiv);	
		  }
		 
		 function checkSubmit(){
			if(checkSeqFlag==false){
				alert("该封条不可用，请输入其他封条号码");
				return false;
			}
			$('#busiInfo_enseal').submit();
			return true;
		}
</script>
		<!-- script end -->
	</head>
	<body>
		<%@ include file="/user_top.jsp"%>
		<div class="realCer">
			<!--导航-->
			<!--主体部分start-->
			<div class="realMain clearfix mt10">
				<%@ include file="/user_menu.jsp"%>
				<div class="realRight ml10 Buyer">
					<div class="mybox">
						<div class="mytit">
							加封业务单
						</div>
						<div class="con">
							<s:form name="formpage" action="busiInfo_enseal" namespace="/"
								method="POST" enctype="multipart/form-data">
								<%@ include file="/messages.jsp"%>
								<s:hidden name="busiInfo.busiNo"
									value="%{#request.busiInfo.busiNo}" />
								<s:hidden name="op" value="%{#request.op}" />
								<s:hidden id="tab" name="tab" value="%{#request.tabIndex}" />
								<%@ include file="simpleBusiInfo.jsp"%>
								<div align="left">
									<s:if test="#request.op==1">
										<!-- enseal start -->
										<table class="basicInfor">
											<tr>
												<th align="right">
													<label for="curSeqId">
														封条号：
													</label>
												</th>
												<td>
													&nbsp;
													<span class="at_text t_1_d"><input
															name="busiOper.seqId" id="curSeqId" type="text" size="30"
															onblur="checkValid(this);" /> <span id="seqIdError"></span>
													</span>
												</td>
											</tr>
											<tr>
												<th align="right" valign="top">
													<label for="operInfo">
														备&nbsp;&nbsp;注：
													</label>
												</th>
												<td>
													<textarea id="operInfo" name="busiOper.operInfo" cols="50"
														rows="5" style="width: 500px; height: 80px;">${busiOper.operInfo }</textarea>
												</td>
											</tr>

											<tr>
												<td align="right" valign="top">
													上传图片：
												</td>
												<td>
													<table align="center" width="600">
														<tr>
															<td>
																<div>
																	<!-- 	
										<span> 
										<div style="position: absolute; right: 35px; color: #f60;">
											上传1200px*1200px以上的图片，即可在宝贝详情页面提供图片放大功能
										</div>
											<div id="J_UploadPicTab" class="upload-manager upload-pic">
												  -->
																	<div class="panel panel-local">
																		<div class="pic-manager">
																			<!-- 
															<div class="side">
																<div></div>
																<ul>
																	<li class="s1">
																		<a href="javascript:;">d1</a>
																	</li>
																	<li class="s2">
																		<a href="javascript:;">d2</a>
																	</li>
																	<li class="s3">
																		<a href="javascript:;">d3</a>
																	</li>
																	<li class="s4">
																		<a href="javascript:;">d4</a>
																	</li>
																	<li class="s5">
																		<a href="javascript:;">d5</a>
																	</li>
																</ul>
															</div>
															 -->
																			<div class="main">
																				<input type="hidden" class="J_FirstPicField" />
																				<ul id="J_PanelLocalList">
																					<li>
																						<input type="hidden" class="J_PicUrl"
																							name="picUrl1" id="picUrl1" value="" />
																						<input name="image_pos" type="hidden" value="1" />
																						<span class="preview" id="preview1"></span>
																						<span class="upload"><a href="javascript:;">
																								<s:file name="myfile" id="myfile1"
																									onchange="previewImage('#preview1','myfile1');" />
																						</a> </span>
																						<!-- 
																		<span class="act"> <span class="moveleft">左移</span>
																			<span class="moveright">右移</span> <span class="del">删除</span>

																		</span>
																		 -->
																					</li>
																					<li>
																						<input type="hidden" class="J_PicUrl"
																							name="picUrl2" value="" />
																						<input name="image_pos" type="hidden" value="2" />
																						<span class="preview" id="preview2"></span>
																						<span class="upload"><a href="javascript:;">
																								<s:file name="myfile" id="myfile2"
																									onchange="previewImage('#preview2','myfile2');" />
																						</a> </span>
																					</li>
																					<li>
																						<input type="hidden" class="J_PicUrl"
																							name="picUrl3" value="" />
																						<input name="image_pos" type="hidden" value="3" />
																						<span class="preview" id="preview3"></span>
																						<span class="upload"><a href="javascript:;">
																								<s:file name="myfile" id="myfile3"
																									onchange="previewImage('#preview3','myfile3');" />
																						</a> </span>
																					</li>
																					<li>
																						<input type="hidden" class="J_PicUrl"
																							name="picUrl4" value="" />
																						<input name="image_pos" type="hidden" value="4" />
																						<span class="preview" id="preview4"></span>
																						<span class="upload"><a href="javascript:;">
																								<s:file name="myfile" id="myfile4"
																									onchange="previewImage('#preview4','myfile4');" />
																						</a> </span>
																					</li>
																					<li>
																						<input type="hidden" class="J_PicUrl"
																							name="picUrl5" value="" />
																						<input name="image_pos" type="hidden" value="5" />
																						<span class="preview" id="preview5"></span>
																						<span class="upload"><a href="javascript:;">
																								<s:file name="myfile" id="myfile5"
																									onchange="previewImage('#preview5','myfile5');" />
																						</a> </span>
																					</li>

																					<li>
																						<input type="hidden" class="J_PicUrl"
																							name="picUrl6" value="" />
																						<input name="image_pos" type="hidden" value="6" />
																						<span class="preview" id="preview6"></span>
																						<span class="upload"><a href="javascript:;">
																								<s:file name="myfile" id="myfile6"
																									onchange="previewImage('#preview6','myfile6');" />
																						</a> </span>
																					</li>
																				</ul>
																			</div>
																		</div>
																		<div class="msg">
																			<span class="orange1 ml5">
																				您的图片空间剩余容量为${request.leftSpaceSize }M。
																				单个图片大小不能超过500K </span>
																		</div>
																	</div>
																	<!-- </div> </span> -->
																</div>
															</td>
														</tr>
													</table>
												</td>
											</tr>

											<tr>
												<td></td>
												<td>
													<a href="javascript:checkSubmit();" class="at_but b_1_y"
														id="reg_sub"><u></u>确认</a>&nbsp;
													<a href="javascript:javascript:history.go(-1);"
														class="at_but b_1_y" id="reg_sub"><u></u>取消</a>
												</td>
											</tr>
										</table>
									</s:if>
									<!-- end enseal -->

									<s:if test="#request.op==0">
										<br />
										<a href="javascript:javascript:history.go(-1);"
											class="at_but b_1_y" id="reg_sub"><u></u>返回</a>
									</s:if>

								</div>
							</s:form>
						</div>
					</div>
					<div>
					</div>
					<!--主体部分end-->
				</div>
			</div>
		</div>
		<!--底部 start-->
		<%@ include file="/user_button.jsp"%>
		<!--底部end-->
	</body>
</html>
